package com.inno.auth.common.enums;

import lombok.Getter;

/**
 * @author sean
 * 通知类型
 */
@Getter
public enum FeedbackNotifyTypeEnum {
    /**
     * "1" 通知用户
     * "2" 发布公告
     */
    NOTIFY_USER("1", "通知用户"),
    NOTIFY_ANNOUNCEMENT("2", "发布公告");

    private final String code;
    private final String desc;

    FeedbackNotifyTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String code) {
        for (FeedbackNotifyTypeEnum value : FeedbackNotifyTypeEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return null;
    }
}
